A peer networking protocol enables peer-to-peer network connectivity among networked computing devices. Examples of peer networking protocols include the Universal Plug and Play (UPnP), JINI, HAVI, Salutation, and others. The UPnP protocol, for example, is designed for pervasive peer-to-peer network connectivity of PCs of all form factors, intelligent appliances, and wireless devices using a distributed, open networking architecture based on TCP/IP and Internet networking standards, so as to enable seamless proximity networking in addition to control and data transfer among networked devices in the home, office, and everywhere in between.
Previously in the UPnP protocol, a developer of a logical device (including, without limitation, both hardware devices, such as a portable MP3 audio player hardware, and software devices, such as an MP3 audio jukebox software application running on a personal computer) that wished to expose the device for peer networking via the UPnP protocol would individually implement the UPnP protocol in that logical device. Additionally, a legacy device built to use a non-UPnP connectivity protocol (e.g., a personal computer peripheral) could be exposed for peer networking via UPnP by implementing a “UPnP bridge,” which adapts between the UPnP protocol and the legacy device's non-UPnP connectivity protocol. In either case, the logical device developer or UPnP bridge-to-legacy device developer would have to expend considerable effort and work to implement the UPnP protocol in the individual logical device or bridge. Further, where multiple logical devices and/or bridges execute using the same hardware computing resources (such as where logical devices for the MP3 audio jukebox application and a DVD movie player application, together with a UPnP bridge to universal serial bus (USB) peripheral hardware devices, are all running on a same personal computer), the separate implementation of the UPnP protocol by each of these logical devices and UPnP bridges results in separate consumption of the computing resources.
The present invention facilitates the development of peer networking capable logical devices, eliminating separate and duplicative implementation of a peer networking protocol by individual logical devices, by providing peer networking hosting of the logical devices. A peer networking host implements the peer networking protocol and provides a programming interface for logical devices and bridges to expose their services to the peer networking protocol using the peer networking protocol implementation of the host. The logical devices and bridges are thus able to expose their services on the peer networking protocol without individually implementing the peer networking protocol.
In accordance with an embodiment of the invention illustrated herein, a device hosting framework provides services for software and devices on a computer (hereafter “hosted devices”) to expose themselves as controlled devices per a peer networking protocol (e.g., the Universal Plug and Play protocol or another peer networking protocol). The hosted devices can include bridges to computer peripheral devices and software that provide a set of services (e.g., the device's functionality). The device hosting framework encapsulates discovery, description and control protocol operations of the peer networking protocol, which frees the developers of the hosted devices from having to individually implement the peer networking protocol in the hosted devices' software and need implement only the core functionality of the hosted device. The device hosting framework operates as a host supporting device interoperability via the peer networking protocol for multiple hosted devices.
The device hosting framework defines application programming interfaces with which the hosted devices obtain hosting support for the peer networking protocol from the device hosting framework. The hosted devices register with the device hosting framework by providing information about their properties. The hosted devices also register service objects with the device hosting framework for each service (hereafter “hosted services”) they provide that is to be controllable through the peer networking protocol. The service objects individually implement a programming interface (e.g., an IDispatch interface) corresponding to a service description per the peer networking protocol for the hosted service that it represents. A utility to automatically generate the programming interface from the service description is provided with the device hosting framework for use by the hosted device's developer.
The device hosting framework services discovery and description requests in the peer networking protocol received from user control point devices that are directed to its hosted devices. The device hosting framework also listens for control requests in the peer networking protocol that are targeted at the hosted devices and services. The device hosting framework translates the control requests into calls to the service objects' programming interfaces (e.g., IDispatch interfaces). The device hosting framework also translates the return information from the programming interface methods into valid control responses in the peer networking device control protocol.
Additional features and advantages will be made apparent from the following detailed description of the illustrated embodiment which proceeds with reference to the accompanying drawings.